package com.lut.factory.abstract1;

/**
 * @author liuning
 * @ProjectName SingleModel
 * @time 2021/12/20 16:57
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("=====小米系列产品=====");
        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();
        IphoneProduct iphoneProduct = xiaomiFactory.iphoneProduct();
        iphoneProduct.start();
        iphoneProduct.callup();
        iphoneProduct.sendSMS();

        IRouterProduct iRouterProduct = xiaomiFactory.routerProduct();
        iRouterProduct.start();
        iRouterProduct.openWifi();
        iRouterProduct.setting();
        System.out.println("=====华为系列产品=====");
        HuaweiFactory huaweiFactory = new HuaweiFactory();
        IphoneProduct iphoneProduct1 = huaweiFactory.iphoneProduct();
        iphoneProduct1.start();
        iphoneProduct1.callup();
        iphoneProduct1.sendSMS();

        IRouterProduct iRouterProduct1 = huaweiFactory.routerProduct();
        iRouterProduct1.start();
        iRouterProduct1.openWifi();
        iRouterProduct1.setting();
    }
}
